/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

/**
 *
 * @author Andy
 */
@Entity(name="outBoundCompletedGoods")
public class OutboundCompletedGoodsEntity extends DataObjectEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    @OneToOne
    private BatchEntity batch;
    private String type;
    private int quantityRemoved;

    public OutboundCompletedGoodsEntity() {
        super();
    }

    public int getQuantityRemoved() {
        return quantityRemoved;
    }

    public void setQuantityRemoved(int quantityRemoved) {
        this.quantityRemoved = quantityRemoved;
    }
    
    public Long getId() {
        return id;
    }

    public BatchEntity getBatch() {
        return batch;
    }

    public void setBatch(BatchEntity batch) {
        this.batch = batch;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OutboundCompletedGoodsEntity)) {
            return false;
        }
        OutboundCompletedGoodsEntity other = (OutboundCompletedGoodsEntity) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.OutboundCompletedGoods[ id=" + id + " ]";
    }

    @Override
    public String childToString() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
